package cn.maxhou.demo.comm;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@ConfigurationProperties(prefix = "room")
@PropertySource("classpath:room.properties")
@Configuration
public class RoomProperties {
    private String title;
    private String addr;
    private int count;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "RoomProperties{" +
                "title='" + title + '\'' +
                ", addr='" + addr + '\'' +
                ", count=" + count +
                '}';
    }
}
